﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sinbiota.Web.Models.ChangeUserPasswordModel>" %>
<%@ Import Namespace="Localization" %>

<asp:Content ID="changePasswordTitle" ContentPlaceHolderID="TitleContent" runat="server">
    <%: Strings.ChangePassword %>
</asp:Content>

<asp:Content ID="changePasswordContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%: Strings.ChangePassword %> - <%: Strings.User %>:<%: Model.Username %></h2>
    <p>
    <%: String.Format(Messages.MinimumPasswordLength, ViewData["PasswordLength"]) %>
    </p>
    <% Html.EnableClientValidation(); %>
    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, Messages.PleaseCorrectTheErrorsBelow) %>

        <%: Html.HiddenFor(x => x.UserId) %>
        <%: Html.HiddenFor(x => x.Username) %>
        <%: Html.HiddenFor(x => x.ResetKey) %>

        <div>
            <fieldset>
                <legend><%: Strings.Fields %></legend>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.NewPassword) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.NewPassword) %>
                    <%: Html.ValidationMessageFor(m => m.NewPassword) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.ConfirmPassword) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>
                </div>
                
                <p>
                    <input type="submit" value="Change Password" />
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
